/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package thienphuc.patient.bo;

import java.util.List;
import thienphuc.patient.dto.NhomThuoc;
import thienphuc.patient.dto.Thuoc;

/**
 *
 * @author QuocDat
 */
public interface ThuocBO {
    
    /**
     * Get all Thuoc
     * @return
     * @throws Exception 
     */
    List<Thuoc> getAll() throws Exception;
    
    /**
     * Get Thuoc by Id
     * @param maThuoc
     * @return
     * @throws Exception 
     */
    Thuoc getById(int maThuoc) throws Exception;
    
    /**
     * Get Thuoc by TenThuoc
     * @param tenThuoc
     * @return
     * @throws Exception 
     */
    List<Thuoc> getByTenThuoc(String tenThuoc) throws Exception;
    
    /**
     * Get Thuoc by TenThuoc and TrangThai
     * @param tenThuoc
     * @param trangThai
     * @return
     * @throws Exception 
     */
    List<Thuoc> getByTenThuocAndTrangThai(String tenThuoc, boolean trangThai) throws Exception;
    
    /**
     * Get Thuoc by NhomThuoc
     * @param nhomThuoc
     * @return
     * @throws Exception 
     */
    List<Thuoc> getByNhomThuoc(NhomThuoc nhomThuoc) throws Exception;
    
    /**
     * Get Thuoc by NhomThuoc and TrangThai
     * @param nhomThuoc
     * @param trangThai
     * @return
     * @throws Exception 
     */
    List<Thuoc> getByNhomThuocAndTrangThai(NhomThuoc nhomThuoc, boolean trangThai) throws Exception;
    
    /**
     * Get Thuoc by GiaBan
     * @param giaBanMin is min price
     * @param giaBanMax is max price
     * @return
     * @throws Exception 
     */
    List<Thuoc> getByGiaBan(double giaBanMin, double giaBanMax) throws Exception;
    
    /**
     * Get Thuoc by TrangThai
     * @param trangThai
     * @return
     * @throws Exception 
     */
    List<Thuoc> getByTrangThai(boolean trangThai) throws Exception;
    
    /**
     * Insert Thuoc
     * @param thuoc
     * @return
     * @throws Exception 
     */
    boolean insertThuoc(Thuoc thuoc) throws Exception;
    
    /**
     * Update Thuoc
     * @param thuoc
     * @return
     * @throws Exception 
     */
    boolean updateThuoc(Thuoc thuoc) throws Exception;
}
